package com.mxpio.erp.common.mes.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@Table(name="MB_ERP_MES_SCAN_LOG")
@EqualsAndHashCode(callSuper=false)
@Entity
@Schema(description="生产扫描日志表")
@AllArgsConstructor
@NoArgsConstructor
public class MesScanLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@Id
    @Generator
    @Schema(description = "主键")
    private String id;

    @Column(name = "BIZ_NO_")
    @Schema(description = "生产订单编号")
    private String bizNo;

    @Column(name = "BATCH_CODE_")
    @Schema(description = "批次号")
    private String batchCode;

    @Column(name = "TASK_CODE_")
    @Schema(description = "工单任务编号")
    private String taskCode;

    @Column(name = "WORK_UNIT_CODE_")
    @Schema(description  = "作业单元编码")
    private String workUnitCode;

    @Column(name = "WORK_UNIT_NAME_" )
    @Schema(description  = "作业单元名称")
    private String workUnitName;

    @Column(name = "SN_CODE_")
    @Schema(description = "sn号")
    private String snCode;

    @Column(name = "OPERATOR_")
    @Schema(description= "作业人")
    private String operator;

    @Column(name = "OPERATION_TYPE_")
    @Schema(description= "操作类型")
    private String operationType;

    @Column(name = "SCAN_TIME_")
    @Schema(description= "扫描时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date scanTime;

    @Column(name = "RES_STATUS_")
    @Schema(description= "响应状态")
    private String resStatus;

    @Column(name = "RES_MSG_")
    @Schema(description= "响应信息")
    private String resMsg;
}
